-- the debug mode
if is_mode("debug") then
    
    -- enable the debug symbols
    set_symbols("debug")

    -- disable optimization
    set_optimize("none")
end

-- the release mode
if is_mode("release") then

    -- set the symbols visibility: hidden
    set_symbols("hidden")

    -- enable fastest optimization
    set_optimize("fastest")

    -- strip all symbols
    set_strip("all")
end

add_cxflags("-EHsc")

-- define target
target("JianGuo")

    -- set kind
    set_kind("binary")

    add_includedirs("src","src/common", "../third_party", "../third_party/jsoncpp")
    add_files("../third_party/jsoncpp/*.cpp")
    add_files("../third_party/modp_b64/*.cc")

    -- add files
    add_files("src/**.cpp")

    add_links("Advapi32", "Shell32", "ws2_32", "User32")